version 14.2
 
log using "dhimaetal_replication_appendix.log", replace

#delimit ; 

*     *********************************************************************** 	*;
*     *********************************************************************** 	*;
*       File-Name:      dhimaetal_replication_appendix.do				       	*;
*       Date:           August 15, 2020                                       	*;
*       Author:         KD, SNG, LBS, KVDS                                      *;
*       Purpose:       	Take dhimaetal_data.dta and replicate paper analysis	*;
* 	    Input File:     dhimaetal_data.dta"										*;
*       Output File:    dhimaetal_replication_appendix.og			     		*;
*       Data Output:    						                	          	*;            
*       Previous file:    														*;
*       Machine:        desktop/laptop         									*;
*     *********************************************************************** 	*;
*     *********************************************************************** 	*;

*set working directory


use "dhimaetal_data.dta", clear;

*     *********************************************************************** 	*;
*		Appendix Analysis														*;
*     *********************************************************************** 	*;


*	**************************************************************	*;
*   **************************************************************	*;
*		Online Appendix E											*;
*		Table A2: Mean votes for women under all 3 electoral		*;
*		systems for treatment groups 1 and 2,						*; 
*		by gender of the voter and by vote in the FPTV 				*;
*		election (Liberal and NDP voters only).						*;
*	**************************************************************	*;
*   **************************************************************	*;

*Liberal Party Voters*

* Group 1 --> Liberal Party All Repondents 
mean fptpwoman if gender<3 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
mean CLPR15woman if gender<3 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
mean OLPRfemale if gender<3 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;


* Group 1 --> Liberal Party Women Repondents
mean fptpwoman if gender==2 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
mean CLPR15woman if gender==2 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
mean OLPRfemale if gender==2 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;


* Group 1 --> Liberal Party Men Repondents
mean fptpwoman if gender==1 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
mean CLPR15woman if gender==1 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
mean OLPRfemale if gender==1 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;


*footnote 1
prtest OLPRfemale=0.47 if OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
prtest OLPRfemale=0.47 if gender==2 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;
prtest OLPRfemale=0.47 if gender==1 & OLPRParty==1 & CLPR!=. & votefptp!=. & OLPRParty!=.;


* Group 2 --> Liberal Party All Repondents
mean fptpwoman if gender<3 & STVParty==1  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
mean CLPR5woman if gender<3 & STVParty==1  & votefptp!=.  & CLPR5_Lib!=. & STVwoman!=.;
mean STVwoman if gender<3 & STVParty==1 & votefptp!=.  & CLPR5_Lib!=. & STVwoman!=.;

* Group 2 --> Liberal Party Women Repondents
mean fptpwoman if gender==2  & STVParty==1  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
mean CLPR5woman if gender==2  & STVParty==1  & votefptp!=.  & CLPR5_Lib!=. & STVwoman!=.;
mean STVwoman if gender==2 & STVParty==1 & votefptp!=.  & CLPR5_Lib!=. & STVwoman!=.;

* Group 2 --> Liberal Party Men Repondents
mean fptpwoman if gender==1 & STVParty==1  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
mean CLPR5woman if gender==1  & STVParty==1  & votefptp!=.  & CLPR5_Lib!=. & STVwoman!=.;
mean STVwoman if gender==1 & STVParty==1 & votefptp!=.  & CLPR5_Lib!=. & STVwoman!=.;


*NDP Voters*

* Group 1 --> NDP Party All Repondents
mean fptpwoman   if gender<3 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
mean CLPR15woman   if gender<3 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
mean OLPRfemale   if gender<3 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;

* Group 1 --> NDP Party Women Repondents
mean fptpwoman   if gender==2 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
mean CLPR15woman   if gender==2 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
mean OLPRfemale   if gender==2 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;

* Group 1 --> NDP Party Men Repondents
mean fptpwoman   if gender==1 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
mean CLPR15woman   if gender==1 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
mean OLPRfemale   if gender==1 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;

*footnote 2
prtest OLPRfemale=0.4 if OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
prtest OLPRfemale=0.4 if gender==2 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;
prtest OLPRfemale=0.4 if gender==1 & OLPRParty==2 & CLPR!=. & votefptp!=. & OLPRParty!=.;


* Group 2 --> NDP Party All Repondents
mean fptpwoman   if  gender<3 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
mean CLPR5woman   if  gender<3 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
mean STVwoman   if  gender<3 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;

* Group 2 --> NDP Party Women Repondents
mean fptpwoman   if   gender==2 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
mean CLPR5woman   if   gender==2 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
mean STVwoman   if   gender==2 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;


* Group 2 --> NDP Party Men Repondents
mean fptpwoman   if  gender==1 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
mean CLPR5woman   if  gender==1& STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
mean STVwoman   if  gender==1 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;

*footnote 3
prtest STVwoman=0.4 if STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
prtest STVwoman=0.4 if gender==2 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;
prtest STVwoman=0.4 if gender==1 & STVParty==2  & votefptp!=. & CLPR5_Lib!=. & STVwoman!=.;


*	**************************************************************	*;
*   **************************************************************	*;
*		Figure A2: Fraction of preferential votes received			*;
*		by the Liberal and NDP Candidates under OLPR.				*;
*	**************************************************************	*;
*   **************************************************************	*;

histogram LibCandidates_OLPR if OLPRParty==1, discrete percent scheme(burd);
graph save lib, replace;

histogram NDPCandidates_OLPR if OLPRParty==2, discrete percent ysc(r(0 30)) ylabel(0 10 20 30) scheme(burd);
graph save ndp, replace;

graph combine lib.gph ndp.gph;
graph export fig_a2.png, replace;


*	**************************************************************	*;
*   **************************************************************	*;
*		Online Appendix F											*;
*		Table A3: Propensity to Vote for Woman Candidate			*;
*		under OLPR													*;
*	**************************************************************	*;
*   **************************************************************	*;

*OLPR vote: All Channels + controls
logit OLPRfemale FemaleStrongGenderIdentity MaleWeakGenderIdentity MaleStrongGenderIdentity FemaleStrongStereotypes MaleStrongStereotypes leftright InfoCandidates FPTPFemaleIncumbent FPTPFemaleNoInc FPTPMaleNoInc CLPR15woman age UniversityEducation  if gender<3 &  votefptp!=. & CLPR!=. & OLPRParty!=.;

*	**************************************************************	*;
*   **************************************************************	*;
*		Table A4: Propensity to Vote for Woman Candidate			*;
*		under STV													*;
*	**************************************************************	*;
*   **************************************************************	*;

*STV vote: All Channels + controls
logit STVwoman  FemaleStrongGenderIdentity MaleWeakGenderIdentity MaleStrongGenderIdentity FemaleStrongStereotypes MaleStrongStereotypes leftright InfoCandidates FPTPFemaleIncumbent FPTPFemaleNoInc FPTPMaleNoInc   CLPR5woman age UniversityEducation if gender<3 & votefptp!=. & CLPR5Party!=.  & STVParty!=.;



*	**************************************************************	*;
*   **************************************************************	*;
*		REPLICATION COMPLETE										*;
*	**************************************************************	*;
*   **************************************************************	*;

log close;

clear;
